package it.patterns.behavioral.templatemethod;

/**
 * 
 * Define the skeleton of an algorithm in a operation, deferring some steps to
 * subclasses. Template method lets subclasses redefine certain steps of an
 * algorithm without changing the algorithm structure. <br/>
 * 
 * <img src="TemplateMethod.jpg" alt="Pattern Structure"/>
 * 
 * @author Luca D'Onofrio
 * 
 * @category Behavioral Pattern
 * @see "Design Patterns - Element of Reusable Object Oriented Software (Gamma,Helm, Johnson, Vlissides)"
 * 
 * @version 1.0
 * 
 */
public abstract class TemplateMethod {

	public final void templateMethod() {
		primitiveOperation1();
		primitiveOperation2();
		primitiveOperation3();
	}

	public abstract void primitiveOperation1();

	public abstract void primitiveOperation2();

	public abstract void primitiveOperation3();
}
